<?php
// 游戏/软件列表页面配置
$pageSize = 2;
$currentPage = max(1, $_GET['page'] ?? 1);
$list = [
    [
        'id' => 101,
        'title' => '星际探险家：未知边界',
        'subtitle' => '开启一段跨越星系的冒险之旅',
        'category' => 'game',
        'tags' => ['科幻', '冒险', '探索', '建造'],
        'release_date' => '2023-10-15',
        'developer' => '银河游戏工作室',
        'publisher' => '星际娱乐',
        'price' => '¥198',
        'discount' => '10%',
        'discounted_price' => '¥178',
        'rating' => 4.8,
        'rating_count' => 2356,
        'image' => 'https://picsum.photos/seed/gamestar1/800/600',
        'url' => '/game?id=101'
    ],
    [
        'id' => 102,
        'title' => '魔法王国：元素觉醒',
        'subtitle' => '掌握元素之力，拯救魔法王国',
        'category' => 'game',
        'tags' => ['奇幻', 'RPG', '策略', '冒险'],
        'release_date' => '2023-08-22',
        'developer' => '奇幻工作室',
        'publisher' => '梦幻游戏',
        'price' => '¥158',
        'discount' => '15%',
        'discounted_price' => '¥134',
        'rating' => 4.6,
        'rating_count' => 1890,
        'image' => 'https://picsum.photos/seed/magic1/800/600',
        'url' => '/game?id=102'
    ],
    [
        'id' => 103,
        'title' => '城市建造大师',
        'subtitle' => '从一个小镇开始，建造您的梦想之城',
        'category' => 'game',
        'tags' => ['模拟', '建造', '管理', '策略'],
        'release_date' => '2023-09-10',
        'developer' => '城市游戏',
        'publisher' => '策略游戏发行',
        'price' => '¥128',
        'discount' => '0%',
        'discounted_price' => '¥128',
        'rating' => 4.5,
        'rating_count' => 1560,
        'image' => 'https://picsum.photos/seed/city1/800/600',
        'url' => '/game?id=103'
    ],
    [
        'id' => 201,
        'title' => '数据可视化工具',
        'subtitle' => '简单直观地创建专业图表和可视化效果',
        'category' => 'software',
        'tags' => ['工具', '数据', '图表', '办公'],
        'release_date' => '2023-07-15',
        'developer' => '科技工具工作室',
        'publisher' => '生产力软件',
        'price' => '¥98',
        'discount' => '20%',
        'discounted_price' => '¥78',
        'rating' => 4.7,
        'rating_count' => 980,
        'image' => 'https://picsum.photos/seed/data1/800/600',
        'url' => '/?s=software&id=201'
    ],
    [
        'id' => 202,
        'title' => '创意设计套件',
        'subtitle' => '一站式图形设计解决方案，适合各种创意需求',
        'category' => 'software',
        'tags' => ['设计', '图形', '创意', '专业'],
        'release_date' => '2023-06-30',
        'developer' => '创意软件公司',
        'publisher' => '设计科技',
        'price' => '¥198',
        'discount' => '10%',
        'discounted_price' => '¥178',
        'rating' => 4.9,
        'rating_count' => 1250,
        'image' => 'https://picsum.photos/seed/design1/800/600',
        'url' => '/?s=software&id=202'
    ],
    [
        'id' => 203,
        'title' => '音频编辑器',
        'subtitle' => '专业级音频处理工具，让您的声音更出色',
        'category' => 'software',
        'tags' => ['音频', '编辑', '音乐', '工具'],
        'release_date' => '2023-05-20',
        'developer' => '音频科技',
        'publisher' => '音乐软件',
        'price' => '¥148',
        'discount' => '5%',
        'discounted_price' => '¥141',
        'rating' => 4.6,
        'rating_count' => 870,
        'image' => 'https://picsum.photos/seed/audio1/800/600',
        'url' => '/?s=software&id=203'
    ],
    [
        'id' => 104,
        'title' => '赛车传奇：极速挑战',
        'subtitle' => '体验极限速度，成为赛道传奇',
        'category' => 'game',
        'tags' => ['赛车', '竞速', '体育', '多人'],
        'release_date' => '2023-04-18',
        'developer' => '速度游戏',
        'publisher' => '竞技游戏',
        'price' => '¥168',
        'discount' => '25%',
        'discounted_price' => '¥126',
        'rating' => 4.4,
        'rating_count' => 1120,
        'image' => 'https://picsum.photos/seed/racing1/800/600',
        'url' => '/game?id=104'
    ],
    [
        'id' => 105,
        'title' => '恐怖迷城：暗影之下',
        'subtitle' => '在恐怖迷城中寻找真相，逃离暗影的追击',
        'category' => 'game',
        'tags' => ['恐怖', '解谜', '冒险', '惊悚'],
        'release_date' => '2023-03-05',
        'developer' => '恐惧工作室',
        'publisher' => '惊悚游戏',
        'price' => '¥128',
        'discount' => '0%',
        'discounted_price' => '¥128',
        'rating' => 4.3,
        'rating_count' => 950,
        'image' => 'https://picsum.photos/seed/horror1/800/600',
        'url' => '/game?id=105'
    ],
    [
        'id' => 204,
        'title' => '项目管理助手',
        'subtitle' => '高效管理团队项目，提升工作效率',
        'category' => 'software',
        'tags' => ['工具', '办公', '团队', '管理'],
        'release_date' => '2023-02-14',
        'developer' => '效率软件',
        'publisher' => '生产力科技',
        'price' => '¥158',
        'discount' => '15%',
        'discounted_price' => '¥134',
        'rating' => 4.7,
        'rating_count' => 1320,
        'image' => 'https://picsum.photos/seed/project1/800/600',
        'url' => '/?s=software&id=204'
    ]
];
return [
        'id' => 'games',
        'template' => '/templates/layout.php',
        'title' => '游戏/软件列表 - 我的网站',
        'description' => '探索我们的游戏和软件产品，包括最新发布和热门推荐',
        'keywords' => '游戏列表,软件下载,热门游戏,最新软件',
        'dependencies' => ['content-list', 'pagination', 'cta'],
        'components' => [
            // 页面hero配置
            'hero' => [
                'section_pretitle' => '我们的产品',
                'section_title' => '游戏与软件合集',
                'section_subtitle' => '探索我们精心打造的游戏作品和实用软件，满足您的各种需求',
                'alignment' => 'center',
                'buttons' => [],
                'background' => [
                    'type' => 'image',
                    'value' => 'https://picsum.photos/seed/gameshero/1920/1080',
                    'overlay' => 70
                ],
                'text_color' => 'white',
                'height' => 'lg',
                'decorations' => [
                    'enabled' => true
                ],
                'show_wave' => true
            ],
            
            // 游戏/软件列表组件配置
            'content-list' => [
                'section_id' => 'game-list',
                'section_pretitle' => '精选产品',
                'section_title' => '游戏与软件合集',
                'section_subtitle' => '浏览我们的热门游戏和实用软件，找到适合您的选择',
                'layout' => 'grid',
                'columns' => '3',
                'filter' => 'category',
                'bg_color' => 'white',
                'card_style' => 'modern',
                'hover_effect' => 'scale',
                'show_filter' => true,
                'show_pagination' => true,
                'items_per_page' => 9,
                'items' => array_slice($list, $currentPage - 1, $pageSize)
            ],
            
            // 分页组件配置
            'pagination' => [
                'total_items' => 15, // 假设总共有15个游戏/软件
                'items_per_page' => $pageSize, // 每页显示9个
                'max_visible_pages' => 5,
                'url_pattern' => '/games?page={page}',
                'show_first_last' => true,
                'show_prev_next' => true
            ],
            
            // CTA组件配置
            'cta' => [
                'section_title' => '寻找更多精彩内容？',
                'section_subtitle' => '订阅我们的通讯，获取最新游戏和软件发布信息',
                'button_text' => '订阅通讯',
                'button_link' => '/?s=subscribe',
                'bg_color' => 'primary',
                'text_color' => 'white',
                'alignment' => 'center'
            ]
        ]
    ];